package com.itdct.onflow.core.entity

import com.baomidou.mybatisplus.annotation.TableLogic
import com.baomidou.mybatisplus.annotation.Version
import com.itdct.onflow.core.annotation.Column
import java.util.Date

/**
 * @author Zhouwx
 * @date 2025/7/20 15:18:07
 * @version 1.0
 * @description 基础实体类，带有基础审计信息
 */
open class BaseEntity: IdEntity() {
    @TableLogic(value = "0", delval = "id")
    @Column(comment = "已删除标记，默认0=未删除，大于0=已删除", sort = -50, defaultValue = "0", nullable = false)
    var del = 0L

    @Column(comment = "删除时间", sort = 10003)
    var deleteTime: Date? = null

    @Version
    @Column(comment = "版本号", defaultValue = "0", nullable = false, sort = 10000)
    var version = 0
}